<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>layui</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<link rel="stylesheet" type="text/css" href="/Public/admin/cache/css/layui.css" media="all">
</head>
<body>
<form class="layui-form layui-form-pane" action="/admin/cache" method="post">
	<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
	    <legend>URL规则</legend>
	</fieldset>
	<div style="width: 92.5%; border: 1px solid #A8A8A8; margin-left: 10px; padding: 10px;"">
		<div class="layui-form-item">
		    <label class="layui-form-label" style="width: 20%;">静态文件后缀</label>
		    <div class="layui-input-block" style="width: 30%;margin-left: 20%;">
		    	<input type="text" name="HTML_FILE_SUFFIX" value="<?php echo ($vo['HTML_FILE_SUFFIX']); ?>" class="layui-input">
		    </div>
		    <label class="layui-form-label" style="width: 20%;">URL规则</label>
		    <div class="layui-input-block" style="width: 30%;margin-left: 20%;">
		      <select name="HOME_URL_PATHINFO_DEPR">
		        <option value=""></option>
		        <option value="/" <?php if($vo['HOME_URL_PATHINFO_DEPR'] == '/'): ?>selected="selected"<?php endif; ?>>/：http://coverweb.cc/List/index/id/1</option>
		        <option value="-" <?php if($vo['HOME_URL_PATHINFO_DEPR'] == '-'): ?>selected="selected"<?php endif; ?>>-：http://coverweb.cc/List-index-id-1</option>
		      </select>
		    </div>
		</div>
	</div>
	<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
	    <legend>静态缓存(缓解服务器压力)</legend>
	</fieldset>
	<div style="width: 45%; float: left; border: 1px solid #A8A8A8; margin-left: 10px; padding: 10px;"">
		<div class="layui-form-item">
		    <label class="layui-form-label" style="width: 150px;">开启电脑版缓存</label>
		    <div class="layui-input-block" style="margin-left: 160px; width: 45%;">
		      <input name="HOME_HTML_CACHE_ON" value="1" lay-skin="switch" lay-text="开|关" type="checkbox" <?php if($vo['HOME_HTML_CACHE_ON'] == 1): ?>checked="checked"<?php endif; ?>>
		    </div>
		</div>
		<div style="width: 50%; float: left;">
			<div class="layui-form-item">
			    <label class="layui-form-label" style="width: 150px;">首页缓存</label>
			    <div class="layui-input-block" style="margin-left: 160px; width: 45%;">
			      <input name="HOME_INDEX_CACHE_ON" lay-skin="switch" value="1" lay-text="开|关" type="checkbox" <?php if($vo['HOME_INDEX_CACHE_ON'] == 1): ?>checked="checked"<?php endif; ?>>
			    </div>
			</div>
		</div>
		<div style="width: 50%; float: left;">
			<div class="layui-form-item">
			    <label class="layui-form-label" style="width: 50%;">缓存时间（秒）</label>
			    <div class="layui-input-inline" style="width: 25%;">
			      <input name="HOME_INDEX_CACHE_TIME" autocomplete="off" class="layui-input" type="text" value="<?php echo ($vo["HOME_INDEX_CACHE_TIME"]); ?>">
			    </div>
			</div>
		</div>
		<div style="width: 50%; float: left;">
			<div class="layui-form-item">
			    <label class="layui-form-label" style="width: 150px;">栏目缓存</label>
			    <div class="layui-input-block" style="margin-left: 160px; width: 45%;">
			      <input name="HOME_LIST_CACHE_ON" lay-skin="switch" value="1" lay-text="开|关" type="checkbox" <?php if($vo['HOME_LIST_CACHE_ON'] == 1): ?>checked="checked"<?php endif; ?>>
			    </div>
			</div>
		</div>
		<div style="width: 50%; float: left;">
			<div class="layui-form-item">
			    <label class="layui-form-label" style="width: 50%;">缓存时间（秒）</label>
			    <div class="layui-input-inline" style="width: 25%;">
			      <input name="HOME_LIST_CACHE_TIME" autocomplete="off" class="layui-input" type="text" value="<?php echo ($vo["HOME_LIST_CACHE_TIME"]); ?>">
			    </div>
			</div>
		</div>
		<div style="width: 50%; float: left;">
			<div class="layui-form-item">
			    <label class="layui-form-label" style="width: 150px;">内容缓存</label>
			    <div class="layui-input-block" style="margin-left: 160px; width: 45%;">
			      <input name="HOME_SHOW_CACHE_ON" lay-skin="switch" value="1" lay-text="开|关" type="checkbox" <?php if($vo['HOME_SHOW_CACHE_ON'] == 1): ?>checked="checked"<?php endif; ?>>
			    </div>
			</div>
		</div>
		<div style="width: 50%; float: left;">
			<div class="layui-form-item">
			    <label class="layui-form-label" style="width: 50%;">缓存时间（秒）</label>
			    <div class="layui-input-inline" style="width: 25%;">
			      <input name="HOME_SHOW_CACHE_TIME" autocomplete="off" class="layui-input" type="text" value="<?php echo ($vo["HOME_SHOW_CACHE_TIME"]); ?>">
			    </div>
			</div>
		</div>
	</div>
	<div style="width: 45%; float: left; border: 1px solid #A8A8A8; margin-left: 10px; padding: 10px;"">
		<div class="layui-form-item">
		    <label class="layui-form-label" style="width: 150px;">开启手机版缓存</label>
		    <div class="layui-input-block" style="margin-left: 160px; width: 45%;">
		      <input name="MOBILE_HTML_CACHE_ON" value="1" lay-skin="switch" lay-text="开|关" type="checkbox" <?php if($vo['MOBILE_HTML_CACHE_ON'] == 1): ?>checked="checked"<?php endif; ?>>
		    </div>
		</div>
		<div style="width: 50%; float: left;">
			<div class="layui-form-item">
			    <label class="layui-form-label" style="width: 150px;">首页缓存</label>
			    <div class="layui-input-block" style="margin-left: 160px; width: 45%;">
			      <input name="MOBILE_INDEX_CACHE_ON" lay-skin="switch" value="1" lay-text="开|关" type="checkbox" <?php if($vo['MOBILE_INDEX_CACHE_ON'] == 1): ?>checked="checked"<?php endif; ?>>
			    </div>
			</div>
		</div>
		<div style="width: 50%; float: left;">
			<div class="layui-form-item">
			    <label class="layui-form-label" style="width: 50%;">缓存时间（秒）</label>
			    <div class="layui-input-inline" style="width: 25%;">
			      <input name="MOBILE_INDEX_CACHE_TIME" autocomplete="off" class="layui-input" type="text" value="<?php echo ($vo["MOBILE_INDEX_CACHE_TIME"]); ?>">
			    </div>
			</div>
		</div>
		<div style="width: 50%; float: left;">
			<div class="layui-form-item">
			    <label class="layui-form-label" style="width: 150px;">栏目缓存</label>
			    <div class="layui-input-block" style="margin-left: 160px; width: 45%;">
			      <input name="MOBILE_LIST_CACHE_ON" lay-skin="switch" value="1" lay-text="开|关" type="checkbox" <?php if($vo['MOBILE_LIST_CACHE_ON'] == 1): ?>checked="checked"<?php endif; ?>>
			    </div>
			</div>
		</div>
		<div style="width: 50%; float: left;">
			<div class="layui-form-item">
			    <label class="layui-form-label" style="width: 50%;">缓存时间（秒）</label>
			    <div class="layui-input-inline" style="width: 25%;">
			      <input name="MOBILE_LIST_CACHE_TIME" autocomplete="off" class="layui-input" type="text" value="<?php echo ($vo["MOBILE_LIST_CACHE_TIME"]); ?>">
			    </div>
			</div>
		</div>
		<div style="width: 50%; float: left;">
			<div class="layui-form-item">
			    <label class="layui-form-label" style="width: 150px;">内容缓存</label>
			    <div class="layui-input-block" style="margin-left: 160px; width: 45%;">
			      <input name="MOBILE_SHOW_CACHE_ON" lay-skin="switch" value="1" lay-text="开|关" type="checkbox" <?php if($vo['MOBILE_SHOW_CACHE_ON'] == 1): ?>checked="checked"<?php endif; ?>>
			    </div>
			</div>
		</div>
		<div style="width: 50%; float: left;">
			<div class="layui-form-item">
			    <label class="layui-form-label" style="width: 50%;">缓存时间（秒）</label>
			    <div class="layui-input-inline" style="width: 25%;">
			      <input name="MOBILE_SHOW_CACHE_TIME" autocomplete="off" class="layui-input" type="text" value="<?php echo ($vo["MOBILE_SHOW_CACHE_TIME"]); ?>">
			    </div>
			</div>
		</div>
	</div>
	<div style="clear: both;"></div>
	<div class="layui-form-item" style="margin:10px 0 10px 42%;">
	    <div class="layui-input-inline">
	      <button class="layui-btn" lay-submit="" lay-filter="demo1">保存</button>
	      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
	    </div>
	  </div>
</form>
</body>
<script type="text/javascript" src="/Public/admin/cache/layui.js"></script>
<script>
layui.use('form', function(){
  var form = layui.form();
  //自定义验证规则
  form.verify({
    title: function(value){
      if(value.length < 5){
        return '标题至少得5个字符啊';
      }
    }
    ,pass: [/(.+){6,12}$/, '密码必须6到12位']
    ,content: function(value){
      layedit.sync(editIndex);
    }
  });
});
</script>

</body>
</html>